package operation;

import book.Book;
import book.BookList;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: 黎鹤舞
 * Date: 2023-11-21
 * Time: 16:04
 */
public class ShowOperation implements IOperation {
    public void work(BookList bookList) {
        System.out.println("所有图书信息:");
        //遍历书架上的书籍信息(这里只需要遍历书架上已有书本数次)
        int currentNum = bookList.getBookNum();
        for (int i = 0; i < currentNum; i++) {
            System.out.println(bookList.getBooks(i));
            System.out.println();
        }
    }
}
